Skip to content

fix: avoid spurious blank line on alr exec when ANSI enabled#2009

Merged
mosteo merged 4 commits intoalire-project:masterfrom
mosteo:fix/extra-line
Oct 3, 2025
Merged

fix: avoid spurious blank line on alr exec when ANSI enabled#2009
mosteo merged 4 commits intoalire-project:masterfrom
mosteo:fix/extra-line

Conversation

@mosteo
Copy link
Member

@mosteo mosteo commented Oct 3, 2025

Fixes #2004

PR creation checklist
  • A test is included, if required by the changes.
  • doc/user-changes.md has been updated, if there are user-visible changes.
  • doc/catalog-format-spec.md has been updated, if applicable.
  • BREAKING.md has been updated for major changes in alr, minor/major in catalog format.

@mosteo mosteo marked this pull request as ready for review October 3, 2025 19:24
Copilot AI review requested due to automatic review settings October 3, 2025 19:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR works around a sporadic spurious blank line printed at program termination by performing explicit cleanup and exiting early from the main procedure.

  • Add explicit temporary directory cleanup and early process exit in alr-main.adb.
  • Minor cleanup in temp file finalization and whitespace.
  • Update VS Code launch configuration to reproduce/debug the issue.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/alr/alr-main.adb Adds Delete_Temporaries and an explicit Alire.OS_Lib.Bailout(0) to avoid finalization that emits a stray newline.
src/alr/alr-utils-temp_file.adb Removes a superfluous null statement after Delete_File.
src/alr/alr-commands-exec.adb Trims an extra blank line (whitespace-only change).
.vscode/launch.json Adjusts the debug configuration to run alr exec and tweak GDB settings.

@mosteo mosteo requested a review from Copilot October 3, 2025 20:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

@mosteo mosteo requested a review from Copilot October 3, 2025 20:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

@mosteo mosteo changed the title fix: exit with code 0 to prevent spurious blank line fix: avoid spurious blank line on alr exec when ANSI enabled Oct 3, 2025
@mosteo mosteo merged commit 6ebdab1 into alire-project:master Oct 3, 2025
35 checks passed
@mosteo mosteo deleted the fix/extra-line branch October 3, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alr exec emits superfluous blank line

2 participants